Fix string allocation handling with GtkBuilder translations
authorKalev Lember <kalevlember@gmail.com>
Fri, 7 Jun 2013 12:12:14 +0000 (14:12 +0200)
committerKalev Lember <kalevlember@gmail.com>
Sat, 8 Jun 2013 08:54:25 +0000 (10:54 +0200)
commita37450110b74605041318a76dac51838953d406d
tree38f6926405adc3cc6e43dcff386b5391a0d0df35
parent6b6334803785cc658709a1ff419d2dcb38d0c27f
Fix string allocation handling with GtkBuilder translations

Use g_string_assign to avoid issues with assigning GString's internal
buffer back to the same string. This can happen when no translations are
available and _gtk_builder_parser_translate returns back the same
pointer that was passed in.

This fixes a regression from commit e9f182e37a7f6e2dc339054841a3c9f930f
that caused GtkComboBoxText <items> from GtkBuilder to show up empty if
no translations are available.

https://bugzilla.gnome.org/show_bug.cgi?id=700629
gtk/gtkbuilderparser.c
gtk/gtkcelllayout.c
gtk/gtkcomboboxtext.c
gtk/gtkcontainer.c